package com.zny.sescore.exception;

import lombok.Data;

/**
 * 业务异常对象
 *
 * @author zhangnayi
 * @date 2021-03-31 14:22
 */
@Data
public class BizException extends RuntimeException {

    private Integer code;

    public BizException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BizException(IMsgEnum msgEnum) {
        super(msgEnum.getDisplayName());
        this.code = msgEnum.getCode();
    }
}
